<template>
    <div class="con">
        <div class="ss" >搜索：<input v-model="text"/><button>点击</button></div>
    </div>
     <product-item :list="dataList" />
  <div class="pagination">
    <el-pagination background layout="prev, pager, next" :total="total" />
  </div>
</template>
<script>
// import axios from 'axios';
import { onMounted,  } from 'vue';

// // import ProductItem from "@/components/ProductItem.vue";
// const text =ref('')

// const dataList = ref([]);
// const total = ref(0)

// 获取数据
const fetchData = async () => {
	// const result = await axios.get('/data.json');
  
// // 筛选出手机
// const data = result.data.data.filter(item => item.class );
// console.log(item);

//   dataList.value = data;
//   total.value = data.length;
}

onMounted(() => {
	fetchData();
})
</script>

<style scoped>
.con{
    margin: 0 auto;
    background: rebeccapurple;
    width: 50%;
}
.ss{
    width: 250px;
    margin:0 auto ;
}
</style>